home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Freeware / Gobby 0.4.7 / gobby-0.4.7.exe / {app} / share / gtksourceview-2.0 / language-specs / objc.lang < prev    next >
Extensible Markup Language  |  2008-09-09  |  4KB  |  120 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.  
  4.  Author: Yevgen Muntyan <muntyan@math.tamu.edu>
  5.  Copyright (C) 2007 Yevgen Muntyan <muntyan@math.tamu.edu>
  6.  
  7.  This library is free software; you can redistribute it and/or
  8.  modify it under the terms of the GNU Library General Public
  9.  License as published by the Free Software Foundation; either
  10.  version 2 of the License, or (at your option) any later version.
  11.  
  12.  This library is distributed in the hope that it will be useful,
  13.  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.  Library General Public License for more details.
  16.  
  17.  You should have received a copy of the GNU Library General Public
  18.  License along with this library; if not, write to the
  19.  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  20.  Boston, MA 02111-1307, USA.
  21.  
  22. -->
  23. <language id="objc" _name="Objective-C" version="2.0" _section="Sources">
  24.   <metadata>
  25.     <property name="mimetypes">text/x-objcsrc</property>
  26.     <property name="globs">*.m</property>
  27.     <property name="line-comment-start">//</property>
  28.     <property name="block-comment-start">/*</property>
  29.     <property name="block-comment-end">*/</property>
  30.   </metadata>
  31.  
  32.   <styles>
  33.     <style id="keyword" _name="Keyword" map-to="c:keyword"/>
  34.     <style id="type" _name="Data Type" map-to="c:type"/>
  35.     <style id="common-defines" _name="Common Defines" map-to="c:common-defines"/>
  36.     <style id="string" _name="String" map-to="c:string"/>
  37.   </styles>
  38.  
  39.   <definitions>
  40.     <!-- ObjC-specific stuff (i.e. stuff which is not C) -->
  41.     <context id="objc-header">
  42.       <include>
  43.         <context id="keywords" style-ref="keyword">
  44.           <prefix>\@</prefix>
  45.           <keyword>interface</keyword>
  46.           <keyword>protocol</keyword>
  47.           <keyword>implementation</keyword>
  48.           <keyword>end</keyword>
  49.           <keyword>class</keyword>
  50.           <keyword>selector</keyword>
  51.           <keyword>encode</keyword>
  52.           <keyword>defs</keyword>
  53.           <keyword>synchronized</keyword>
  54.           <keyword>private</keyword>
  55.           <keyword>protected</keyword>
  56.           <keyword>public</keyword>
  57.           <keyword>try</keyword>
  58.           <keyword>throw</keyword>
  59.           <keyword>catch</keyword>
  60.           <keyword>finally</keyword>
  61.         </context>
  62.  
  63.         <context id="types" style-ref="type">
  64.           <keyword>BOOL</keyword>
  65.         </context>
  66.  
  67.         <context id="objc-string-literal" style-ref="string" end-at-line-end="true">
  68.           <start>\@"</start>
  69.           <end>"</end>
  70.           <include>
  71.             <context ref="c:string:*"/>
  72.           </include>
  73.         </context>
  74.       </include>
  75.     </context>
  76.  
  77.     <!-- ObjC-specific stuff (i.e. stuff which is not C), which isn't
  78.          good to highlight in C headers -->
  79.     <context id="objc-source">
  80.       <include>
  81.         <context id="objc-keywords" style-ref="keyword">
  82.           <keyword>self</keyword>
  83.           <keyword>super</keyword>
  84.         </context>
  85.  
  86.         <context id="objc-types" style-ref="type">
  87.           <keyword>apply_t</keyword>
  88.           <keyword>Class</keyword>
  89.           <keyword>id</keyword>
  90.           <keyword>IMP</keyword>
  91.           <keyword>MetaClass</keyword>
  92.           <keyword>Object</keyword>
  93.           <keyword>Protocol</keyword>
  94.           <keyword>retval_t</keyword>
  95.           <keyword>SEL</keyword>
  96.           <keyword>STR</keyword>
  97.           <keyword>TypedStream</keyword>
  98.         </context>
  99.  
  100.         <context id="objc-common-defines" style-ref="common-defines">
  101.           <keyword>METHOD_NULL</keyword>
  102.           <keyword>nil</keyword>
  103.           <keyword>Nil</keyword>
  104.           <keyword>NO</keyword>
  105.           <keyword>YES</keyword>
  106.         </context>
  107.       </include>
  108.     </context>
  109.  
  110.     <!-- actual language definition: ObjC-specific stuff plus everything from C -->
  111.     <context id="objc">
  112.       <include>
  113.         <context ref="objc-source"/>
  114.         <context ref="objc-header"/>
  115.         <context ref="c:c"/>
  116.       </include>
  117.     </context>
  118.   </definitions>
  119. </language>
  120.